Fix hanging test