Performace fixes