Fixes ambiguous column in user sql query.