fix error with scope.$apply() when clicking pin job button