Fix issue with object return type