fixed delete handler