Distance was being casted between UINT16 and int