fixed doReplace method