bug fix in relation