fix fromQuery with __toString methods
Merge pull request #94 from dfeng/patch-1

fix fromQuery with __toString methods