fixed output bug
fixed replace bug