fix widget crash