editor: fixed bugs