Debugged keylist loop