fixed selection bug in editor