do not fail badly if aspect ratio is 0/forbidden, fix issue 369