Fix bugs for 1.6