Are the below sentences grammaticaly correct?

If people only knew how humble we are.

I did not know what your name is.

I came accross these two sentences while I was reading a book. I am asking this question because in all the books on English grammar I have read so far, both of these sentences are incorrect. Shouldn't am and is have been in the past tense(WERE AND WAS)?

I appreciate your taking the time to respond to my question.
Actually, I have a different interpretation.

I didn't know what your name is (and I still don't know).

I didn't know what your name was (although I've since learned it).

But either way, the sentence is correct.
There have been a lot of threads on this subject. The consensus has been that if we may reasonably assume the condition persists, we may choose either tense, absent context to the contrary. (Of course, such context would make the assumption unreasonable.)
Teachers: We supply a list of EFL job vacancies
The first sentence is in the subjunctive mood (present tense).
In the second, if you write " what your name was", it implies that you don't have the same name now as you did then. You have changed your name.
 BarbaraPA's reply was promoted to an answer.
RIght on, GG! Interpretation out of context is dicey at best!
Students: Are you brave enough to let our tutors analyse your pronunciation?
 Avangi's reply was promoted to an answer.