Fixed bug where scalar returns wouldn't be handled properly when invoking.