Adding a cast to the data_pack method to emphasize type difference.