correction of type error and learningcontroller