changed js order to fix NoVacancy error