Fixes to galaxy integration