changes and database fix