Fixing Issue #349 with fix for onError