Fixes for the database class