Hackish fix to new query structure