fix #35 and fix #115