Fixed problem when resizing from very small to big