Fix calling method in js.