fix bugs with alert message