Fixed elusive uncaught exception during wait.