Fix for import error if import is run while blender is in edit mode.