better handling of checkmode and async fix test to follow new flow control (cherry picked from commit e29dc49a49)
e29dc49a49