Dirty fix for memory alignment issues