Fix #851 and #852: Fix case issue and objectification of error
Merge pull request #857 from mvriel/852

Fix #851 and #852: Fix case issue and objectification of error