Fix magic numbers; maybe even endianness issues

The constant seemed odd; why is the endianness different than the #define'ed macro?
Anyway, please review carefully my changes before applying.