minor bugfix: numeric_limits<double> to be consistent with the context