fixed bug in xhr error callback -- should be 'error' not 'failure'