fixed numeric_limits problem