fix small bug when no gui