fix replacing text