fix mixing internal errors with callback errors

this is a fix for #450