creating database structure fix