Fixing bad replace