cluster: use int instead of size_t.