Improve query for zombie checks