some more performance fixes