references_many bug fixed