bug fix in create db