fixed some bug for 1.7 release