Fixed a bug with returning geometry.
Cleanup.