Hi Evangeline,
There's no such thing as “sometimes” in IT :-) There must be a pattern, such as accidentally pressing the close button twice. Or trying to show an object that has been deleted in the background etc….
It might help to share here the composition of the page and the activities happening in the close action…
Jacob