I was not necessarily panicking, i was thinking clearly and responsive, but it felt like i was actively forcing myself to keep a cool head, the biggest "panic" was mostly when the reg popped out of my mouth as i was focused on fixing something else, and it took me by surprise. Once i had my reg back in my mouth, it was not that bad. Its on me that i never bothered to check how that reg works, considering half the group i dive with uses it. As long as i'm safe and alive every mishap is a good lesson.