Some bug fixes in TSCollection