Fix learning factory