Fix return type
Merge pull request #6232