clear nodespace cookie on error

also, some missing semicolons