fix bug in adopt method