Removed formatting bug in replace()