Bugfixes in circular averaging.