Get everything working again after db overhaul

This should fix the problems that occurred after the db upgrade. tested everything I could think of