circle bugfix and tests