Fixed bug when printing collections