Added mechanism to wait ga sending data