Fixed bug in relate.