fixed db relationships