removed some bugs.