Fixed memory alignment issues.