fix some bugs.
VER 1.0 : fixed all bugs.