fix type assertions