Fixed bug with visual flash