fix small mistakes

fix endian mistakes, mistaken word length and preprocessor mistake
Merge pull request #88 from Bigpet/master

fix small mistakes