fix type assertion problem