Fix for Angular 1.3