Fix cancel on firefox