Handle command exception. Fixes #118