fix invalid handle value for x64. closes #123