fix #38, fix #42