fixing the callback for errors