Removed debug printing to find source of NaNs