Made error messages more obvious. Issue: #623