Ensure callback is not called multiple times on error

I'm not sure what the desired behavior is, but this is a test and possible fix for #85.