Fix stack cookies. Revert changes made in 638a078 and re-adapt.