Fixed various errors.