Fix endianes errors: Integers had to be casted before using the macros.