Oh, my code is not that correct, since the replace wouldn't have a effect after the 2nd click.