improve error message in a common case
Merge pull request #49 from iansmith/better_error_message

improve error message in a common case