Fix bug: freeze when video playing ends