I have to confess that while I never had any problem with such phrases I had to look up the reason why it is like it is in a grammar book. It's a distinction I had never really thought about before.
And this is very strange. English is not your mother toungue. How could you say it corectly if you did not know the rules? We learnt structure of English qestions and trained using them for a very long time. And questions with "who" and "what" were treated separately and much attention was paid to distinction between questions where "who" ("what") is a subject and where it is an object.