fix #214 and  fix #217