Localized the hanging test to the  clause.