Fixed flash effect issue