Fixes for window resizing.