Corrected a bug that set a faulty mode