Merge "Fix index out of bounds exception" into main