in/outframe + i changed to in/outframe[i]