some bugs fix
Merge remote-tracking branch 'pet/master'