Fixed the code to build a list from keys of a hashtable