RelationTest and Bug Fix for Relations