Fixing screen flickering