Fixed wrong transaction handling