cookieID exception and security issue fixed