fixed most of the layout issues when changing window size