Oh and one more thing to remember -- the key (D major) is based relative to the position of the capo!!! The actual pitch is F major --- so maybe it wasn't sounding right because you were playing notes up the neck in D major positions against what amounts to an F chord.
So remember you would have to play 3 frets up to match the key!
Mike
Keep rockin!
Mike Olekshy
GT Guitar Coach