stack protection as I suck at C
fixups, although still data_t corruption :(