fixed error callback