fix bug on keys/cleankeys.

[ticket: X]