fix for flickering when typing fast