fixed possible uncaught error when calling abort()