fixed #21, fixed #22