Fixed bugs in congeneric calculator.