Properly fixes cookie setting