Bug fix cookie problem