fix: error function should return number value.