Fix wrapError and pass all of the model tests