Fix initialization, return object instead of array