merged your recent changes and fixed user_id not found errors