Fixed exceeding maximum window size