Fix transaction context manager