Corrected Pack & Unpack Functions