js-permission & modify small bugs