correct a bug due to an hashset