Fixed learner

It was not delivering last instance it has seen due to wrong semantics.