Fix has_many relationships