adding default values for error values to prevent NaN propagating unnecessarily