fixes for JP's pr comments