Fixed problem with learning