Fixing error callbacks