Fixing jobs database and handling undefined jobs in the index view