fix recommendation logic