Window handle was not always declared/defined. This has been fixed.