Fix wait, Updated Example, Tested Angular 1.3