fix  $remove bug