fix type validation