Fix some problems.