Fixed all bugs for JSB