fix bugs for minified file