fix bug for userid =nil