Added some minor fixes, before the big work on the object queries