fix angularjs scope update in callback