database setup fixes