Sometimes, we do things that make us feel super guilty that we’re being rude. But you’re really not. This is ok.
Leaving a party/function early, or even at a reasonable hour. A lot of people take offence if you leave before the end and it’s a drag.