[ fix ] logic_to_buf, reverse ordering