fixed open window functionality