more fixes + minified version