Corrected couple of mistakes in valid_log_data function.