Wrong error returned to callback block