Merge "Fix NoSuchElementException thrown when transaction is empty"