Fix AngularJS implementation