Try changing replace option to replace correctly