Update __init__.py

added window validation