Fixed some bugs in genes calculator.