Fixed bugs in episode length check