Added brackets around for statement in cookies fix.