Fixed some bugs in LearningParameters