Fix bug with creating database tables.