fix some bugs.
1. fix some bugs