fix readmode bug