When I first heard Leonard Cohen's famous song
Hallelujah, I thought the last line of the first verse was
The barefoot king composing Hallelujah
This makes sense in reference to 2 Samuel 15:30
And David went up by the ascent of mount Olivet, and wept as he went up, and had his head covered, and he went barefoot: and all the people that was with him covered every man his head, and they went up, weeping as they went up.
But all the lyric sources on the internet including
Cohen's official site have the line as
The baffled king composing Hallelujah
which makes no sense whatever in the context of the verse. Can anyone suggest why David might have been baffled rather than barefoot? Does anyone have evidence to suggest that the words have been changed through error?