fixed bugs with json editing mode