Fixed window resizing issues