perfomance fixes