fix error in getTTsample when the structure is empty