Fixed some database problems
Merge pull request #3 from alotofdavid/updated-database

Fixed some database problems