Fixed bug in editor