Merge pull request #731 from cspurk/master

fixed/improved recommendations repair code