fixed script errors because ng-file-upload is dumb