Adjusted speed functions to not apply when input is zero.