fixed issue with printing the dictionary