fixed err in client count check