add cookie fix to redirect