Fixing replace for custom configuration