Fixing associations logic