BUGFIX: wrong behavior in split and replace on empty str