Fix mutate not consider input bug