fix issue #5173
#5173
added @return tags and missing return
Merge pull request #5176