BS-2185, fix npe on submit due to cookie undefined.