Fix not replace bug caused by ajax loading.