Fixed event deletion bug