fixed #157, #165, #172, added .min file