few fixes on transactions