Fix karma and minification