Fixed bug in genes calculation.