Fixed a bug with the close button.