Bug fixes, added support for seamless loops