issue #185: fix error when trying to close open events

The local variable in the loop was using e, but, the id for open events was trying to use the word event.  Switched variable names and closed a couple events, did not receive a status 500 error.