Fixed out of bounds write.