fixed memory align bug