fix alloc & release
fix bugs in recommender