fixes some bugs

in db:seed, logic of referal_id