Fix bugs in dust emission/scattering