gets rid of cursor flickering