Fix #39: "break" should be "continue", add tests