small patch for --no-graphics mode

fixed --no-graphics bug noted in issue #1322