Fix return types
Fix #1327
Merge pull request #1328 from sjinks/issue-1327

[1.3.0] Fix #1327