fix minify bug and add some features