fixed adding/deleting crash when changing activities