fix for return on rest api