transactions bug fixes