fixed datatype bug in relationship table