Added correct clearing of encoders by a special command