Fixed collection join query bugs.