Fix various errors.