Improve error message
Fixes #1548
Fixes #1548
Fixes #1548, #1550