Removed redundant code for close button