fix fragment replacement issue