Fix inverted repeat option and improve the example