remove lingering undefs