fixed error handling bug
Merge branch 'master' of github.com:admc/wd