fix _log_message bug