Fixes bug in delete cookie function