delete events correctly. add a selector for maps only