fixed addTagToActivity function