slight out-of-bounds fix