fix to query by userid