Fix previous refactor bugs... sigh.