Improve error messages on type mismatch (fix #22)