Fix bug where workload query interfered with error checking