update scope on ajax