Corrected out-of-core density code.