Fix bug where existence check was looking at the wrong table.
Merge pull request #1 from daveslutzkin/master

Fix bug where existence check was looking at the wrong table.