Replacement for #3940
Fixed docblocks
Merge pull request #3963 from GrahamCampbell/4.1-fix

Replacement for #3940
Merge branch '4.1'