Fixed issue when cookie name has leading/trailing spaces