out of bound access fix