almost final fixes