fixed a bug making events created offline not deleted