Fixed alignment and segfault