Protecting against empty transactions