Fixed bug where relation ebrary did not have a type