fix another crash in non-GUI environments