add umd and fixed a small bug