Fixed lost callback in error case