Fix problem with loading schema on empty database