Fix test not finishing