Fix bug in errorHandlingSpec