fixed issue with userid = 0