Fix for window resizing;