fix repeats of some tests
add some error detection for empty repeats