Fixed the issue with resizing