fix #96, fix #119