bug fix for toggle not closing after link clicked