modify the SQL in line 6435 in ListKeys()