I've read the recommendation perhaps here or I forget if it was an article from a TdF rider to keep your thumbs wrapped/draped around the bar if you're on the top bar. A lot of riders have taken minor bumps and lost control/attachment to the bike.

Glad you are ok Way to recover from the bump