slight correction in rest.py