fix for error callbacks