Some more logic tweaks