Fixed a bug in forward, atmo_pre not defined for reset_densities