fix cookie check for navigation