when generating clusters, first load users and then retrieve max_cluster_id
minor changes