Some minor fixes to handle empty labels, etc.