Fix log_number in LogAndApply