Some critical bugs in database were fixed.
Merge pull request #8 from VEINHORN/develop

Some critical bugs in database were fixed.