Duplicate DB submissions with mongoose

I'm new to node.js and I'm having an intermittent issue with some commands being duplicated. I think it might have something to do with the fact that I'm trying to separate my db interaction from the rest of my code and I haven't isolated it properly. I have a file called transaction.js as follows.

var mongoose = require('mongoose');    
    mongoose.connect('mydb');

    function Transaction(){
        var actions = [];
        this.Add = function(query){
            actions.push(query);
        };
        this.Commit = function(){
            for (var i = 0; i < actions.length; i++) {
                actions[i]();
            }
            actions = [];
        };
    }

    exports.Transaction = Transaction

I begin a new transaction with

var transactionlib = require('../DB/transaction');
var transaction = new transactionlib.Transaction();

and call the transaction with

exports.PostHome = function(req, res){
    var id = new ObjectId(req.body.objectId);
    transaction.Add(function(){
        models.Story.findOne()
            .where('_id').equals(id)
            .exec(function(err, story){               
                saveOrUpdateStory(err, story, req, res);
            });
    });
    transaction.Commit();
};

It should be mentioned that within saveOrUpdateStory there are more db calls taking place.

This seems to work fine but now and then it appears to duplicate the command (a submission will be added twice). My current theory is that this has to do with two people submitting two commands at the same time and the transaction list being shared between both of them. I'm not sure of this though and would love some help. Any criticism on my code structure would also be appreciated as I'm still learning best practices in node.

If anyone is coming across this with the same issue I'd just like to clarify what was wrong. I had a Homecontroller.js which I was never creating a new instance of, so all requests were accessing a global instance of it. The result was that two requests could fire the same transaction twice if they were within a short enough time period.

In Hindsight, it's a good idea to wrap your controllers in functions (google "Module pattern") so that this doesn't happen.