fixed bug in dequeing jobs