Fix ajax update method