fix floating point exception.