Fixes also due to AngularJS deprecated methods