minor changes to database stuff