save to index when empty str specified for edit
fix bug of lacking import