Fixes

Fixed database class