Fixed bugs in music looping
Code formatting