close event in error reference