Added differentiation between cluster and local mode