DB fixes (again...sigh). Need to get some sleep, I guess