Perfomance fixes