nillify err before doing the last part