has-many relations, and some fixes