Added background job detection although it is buggy