Undefined index fix in cookie provider