Fix test failure in non-graphical mode