trying to fix some db stuff