fix bug with circle function