More fixes for rectangular images