Fix bug in checkLearnset