Fix error callback