Fixing massive bug inserted in my previous commit.
Big endianness was being incorrectly handled.