Fix typo and deprecated use of ~