Fixed bug where AjaxError was not sent as parameter to Error function, causing ClassCastExceptions in-app.