Fixed the resizing issues