fix bug in fitness.cpp