You get the +2 from a shield even when you are currently using your ranged weapon. Or you did, I've not checked lately.