Fix bug in learnLemma