Fixed a reference error to the error callback.