slightly more specific error check.