Fix flash alert box closing