checking to delete invalid reg ids