Fix issues for JSB