Added guard around `add_alias` and `delete_alias`