fixed a potential untermining loop in generate_splits()