Removed wrapping from the cookie script because this will automatically be wrapped. This 2nd wrapping broke the functionality