better handling of empty tags and sources