fix bugs for adaptive method