fixed database stuff 2