stack smashing detection + fixes