Fixed bug with non object return values