More performance fixes