Corrected video number calculation. Fixes #1