Fix some bug, add getKeyValues