Angularjs pi.js update for #886 issue