Properly pass things to .replace