Add close function to alerts