fix bugs for self-placement and improve some features for pipeline