Fix alert handling