Sanity checks to prevent negative frameIdx errors