Fix cookie assignment