Fixed a few bugs esp when getting the relations it was sometimes with or without namespace info