Fixed call to get data length