Fix whitespace and bug in replaying over cyclic buffer