Database and code connected with database fix