fix type assertion