fixed error with division by zero when a limit is set at 0