Replaced non-working Schema::pack() calls with a working function.