fixed compiler warnings around string/replace