fix native c code