fixed a small bug that change state to manual when it should be changed to automatic