Fix bug in runKeyHelper method :( new code, new bugs )