fixing bug in editor