fix bugs in free loop for style and rewind logic