fix the delete unused card script