fix some problems.