fix bugs and support for non-cluster