fix #95, fix #52