Fixes to cookie stealing and argument processing