On the instrumental variable estimation with many weak and invalid instruments