Fixes incorrect return type of try block

Embarrassing bug and a quite simple fix.