Fixed auto resizing problems