small patch for --no-graphics mode