fix bug in keyset