fixed bugs with async behavior.

Change-Id: I239656cb1a4758abf6e2eca406df8f7354957abc