Fixed a floating point exception error