clean up some db stuff