add edit mode exit instead of whole plugin unload