Added support for auto data_length calculation (still flaky though)