Fix plotting errors.