Fixed a bug in decode() preventing to fully decode structures