fixed issue #76 and merge #67