fix issue where script calls back before callback registered.
fix issue where script calls back before callback registered.

ggershoni/angular.js,ggershoni/angular.js,ggershoni/angular.js,ggershoni/angular.js