bugfix: only create dict key if value is not empty