CAL-861 fix somes bug on rest api