workaround for angular/angular.js#1050