fiixed mode switching bug in jsoneditor