circular layout: fix bugs