IsWaitingForData from @aks81 #671

Closes #671