catch exception and ignore if handler is already removed