Properly compare dictionaries