fixed an adoption bug