Decoding bug fixes #42