Prevent negative order calculations, and log cases where this happens.