Added performance fixes