Making sure that beforeClose only gets fired once.
0.0.39