fix delete handler