fix query for currently executed jobs