bugfix: checking keys are equal