Update packing code with latest rapa change

Adds an assertion on width before division.