fixed off-by-one bug in spatiotemporal timeline and image mask