Merge "Fix out of bounds access" into klp-dev