Fixed race condition bug; aligned memory