fixed some bugs

But the fitness valu still needs to be verified...