Fixing some issues with getter fields and sorting in relationship fields