fix key compare