fixed the mass NaNs that were popping up