Improved relationships handling and improved mapping collisions check