Fix callback on error