fix a bug with dictionary keys getting , in them