fixing possible bug with editor