Fixed error with bad cookies