improve schema mismatch handling