Fixed inreplace warnings