Merge pull request #1878 from swryan/work

handle disconnected var & add some additional error reporting