typo and better message on unpacking failures