performance fixes