fixed optional prefix and suffix to replace()