Bug fix. Removed unnecessary code for database that doesn't work yet