Added more checks to make sure that subtitles keep the MIN_DURATION

Fixed tests after JS changes.