Minor fixes, window hWnd etc.