Multiple improvements to accurately track state of the remote scanner

fixes issue #106