fix #48, fix #42