Fixed out of bounds read.