Made DB commit() method properly bail out if no trx is active