Fixed a bug with sequencing for allocating windows.