fix bug where firefox didnt close cart