Fixing screen resize bugs