Fix some deprecated issues in cookie processing