Bug fix in tostring