Fix missing return types.

Fixes #1352
Merge pull request #1358 from Arnavion/fix-missing-return-types

Fix missing return types.