fixed problem with resizing