fixed #29, fixed #32