fix: crash on reaching the end of some videos
