Fixed relationship bugs