Fix for undefined this.options when _onError function is called

Fix for undefined this.options when _onError function is called