fix potential out of bounds error