prevent negative values from being returned... shouldn't happen, but prevent it anyway