Minor improvement in fragment replacement