Some AngularJS fixes