Couple of bugfixes in the listKeys