fixing the issue with close button