fix transactions bug