fix error in new rest api