Bug fix in cluster plot, also fixed some tests