Fix Adopt algorithm