Adjustments to keep track of frames more accurately

Signed-off-by: Lindsey <glickfeld@neuro.duke.edu>