Fix loading bug. Make some expensive asserts optional.