54c11f2f introduces a bug in onCloseHandler and onErrorHandler. autoApply is undefined in the context of this two methods.