Fixed issue with Cookie not being set