fix a bugs.