Fixed GA code bug