fix script for search invalid objects on database