Fixed flash not working properly in 1.7