Fixed building from npm issue and fixed seg fault when listing a nonexistent job