Fixes onFailure reference.