Changed .replaceFirst to .replace so that it doesn't try to use regex and breaks when things like $ is passed into it