final fixes to previous commit