fixed #20, fixed #17