Merge "[DO NOT MERGE] Fix signedness mismatch and integer underflow" into oc-dev