fix empty array bug in synth_clust function