fix driver cleanup procedure