Typo and ref fixes