fix bug with str_replace()