Fix for resizing issues on X11