fix replace not always being there