ajax wait before updating table