fix build scripts and minfication