bug on error callback