Fix to be more flexible for empty tags