Avoid out of bound access