Fixed db transaction commit issues