sizeof segfault fix