Fix for command repeating. Should fix #3