prevent orphans and windows