am 0c7f6dd9: Merge "Fix couple of instances of undefined behavior"