loop and autoplay bugfix