Fixed string replacement errors as found by findbugs