Change reference to value return types.
Needed because setScene is not available in StateTransaction.