Adds missing brackets. Fixes bug in getting next job.