performance fixes

small changed, 10x gains