Fixed a bug when switching to open loop control