Fixed unaligned access fault
Fixed compile error with newer toolchains