Fixes #221: wrong return types causing 500 error.