resuce EINVAL errors
Merge pull request #1 from edmodo/rescue

Resuce EINVAL errors