Correctly handle errors on command with ID provided. Fixes #1.