fixed the null point exception in getClusters