update

fix switch problem in write mode