Optimize performance slightly