Aim to fix #208 and #288 - r_str_replace issue