Fixes some database bugs
Merge pull request #15 from jbbrokaw/getDataFunctions

Fixes some database bugs