Fixed the initialization of has_many collections