fix on model.build_rest()