fix off-by-one frame error