fix jobs undefined bug