Fix track end handling bug
Fix loopstart command bug
Fix track state clearing bug