fix alert box closing