Fix sizeof() bug and update for new packaging format