Fixes to database and achievement class
Fixes for database class error