some performance things
minor fixes