Auto replace is compatible with types
Fixed unit tests related to auto-replace