fixed database
fixed some db stuff