fixes #544, windowIds can now handle initial value of -1 or 0
Merge pull request #566 from andyperlitch/initial_wID#544

fixes #544, windowIds can now handle initial value of -1 or 0