fixed single paragraph replacement issue