Fixed an issue that was breaking the build on Clang compiler
decode packages only when it is necessary