Fixed Small Bug for Rectangular Windows

Fixed a bug that was causing some rectangular windows to be generated in
a slightly wrong place