Improve error message when invalid option format is provided
Merge branch 'issue739' into 1.6.x