Try to fix some bugs.