Fix alert function.