Fix bug valid keys