fix some bugs fix issue #67