native method call bug fix