Fixed switching bugs on playback ending and auto-switch