Added more tests and discovered timing bugs. Resolved.