final fixes from Feng