Fix showing alert bug