Bug fix: __toString called non-existing function