Fixed issue with auto resizing