Fixed resizing and moving after refactoring.