fixed performance hog, smaller fixes