closes #2065 There seemed to be a timing issue. A simple rewrite using async/await seems to solve the problem.