Fixing the add_tags function