delete useless entities