Fixing queries and updates.
Improved support for guids.