fix a few minor things for clustering