Fix invoking recolor after text replacement (fix #189)