Fixed several errors.