Revert "Fixed problems with resizing window"

This reverts commit f06e6bc9a0b3e1b30a29edf7b7ce65685c0ccf8b.