fix on close event - mocks chage