better dispose for square.js