add maint.js and repair a bug