Fixing the GA code