Fix error when schema is null (disconnected backup and restore)