Duplicate close button bug fix