some minor performance tweaks