Fixed some issues with the function string_replace. There are still issues to be resolved.