adjusted is_open condition