Fixed several problems.