only call the error callback once