Fixed functionReplace.