fix lattecs return code