fix ordering when creating new database