fix bug in getting input jobs