Slight modification to solve a floating-point exception. No functionality change