fixed a bug with command repeats