adding return statements before calling the callback when errors occur

This works better :smile: