Fixed issue when trying to return an empty array from get_root