trying to fix these crazy db issues