Minor code optimization