db relations fixed