some fixes from working on performance part iii