fixed a minor bug in the mode
Fixed a minor bug