-- fixing a bug handling empty attributes