Change resize logic of GUI