fixing nasty bug were firefox would stay up at the end