minor performance tweaks