fix bag.js usage